﻿
app.controller("ngPostDetailController", function ($scope, $http, $location, $routeParams, $window) {

    $scope.postVM;

    $scope.back = function () {
        $window.history.back();
    }

    $http.get("/api/post/" + $routeParams.id).success(function (data) {
        $scope.postVM = data;
    }).error(function (data) {
        console.log(JSON.stringify(data));
    })
});